{include file="admin/head" /}

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">预约管理</a>
        <a>
          <cite>器具进行预约情况</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div style="padding: 20px">
    <table class="layui-table">
        <thead>
        <tr>
            <th>预约人</th>
            <th>器具名称</th>
            <th>开始时间</th>
            <th>时长</th>
            <th>所属课室</th>
            <th>管理教师</th>
            <th>提交时间</th>
            <th>状态</th>
        </thead>
        <tbody>
        {volist name="tools" id="tool" empty="暂无预约数据"}
        <tr>
            <td>{$tool->user->userinfo->realname|default="暂无此人信息"}</td>
            <td>{$tool->tool->name|default="暂无器具信息"}</td>
            <td>{$tool.starttime}</td>
            <td>{$tool.time}天</td>
            <td>{$tool->tool->lab->name|default="暂无实验室信息"}</td>
            <td>{$tool->tool->lab->teacher->realname|default="暂无此人信息"}</td>
            <td>
                {$tool.create_time}
            </td>
            <td>
                {switch $tool.statu}
                {case 0}未审批 {/case}
                {case 1}借出中，尚未归还 {/case}
                {case 2}<p style="color: darkred">退回</p>{/case}
                {case 3}<p style="color: #5FB878">完成</p> {/case}
                {/switch}
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page">
        {$tools|raw}
    </div>
</div>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });
        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
</script>
</body>
</html>